let express = require('express');
let router = express.Router();

/* GET home page. */


/**
 * 微信验证接口
 */
router.all('/verify', function(req, res, next) {
   const s = req.args.signature || '';
   const t = req.args.timestamp || '';
   const n = req.args.nonce ||'';
   const e = req.args.echostr||'';
    global['bean'].AuthCheck.check(t,n,e,s).then(data=>{
        res.send(data);
    }).catch(e=>{
        next(e);
    });
});

module.exports = router;
